<?php
 require('session_start.php');
 
 // is the one accessing this page logged in or not?
 if (!isset($_SESSION['db_is_logged_in']) || $_SESSION['db_is_logged_in'] !== true) {
 
    // Chưa login, chuyển qua trang login
    header('Location: login.php');
    exit;
 }
 
 ?>
 <html>
 <head>
 <title>Admin Page</title>
 </head>
 
 <body>
 <p>Chào bạn <b> <?php echo $_COOKIE['UserCookie']; ?> </b></p> 
 <p>Bạn đang ở trang Admin</p>
 <p><a href="logout.php">Click here to Logout</a> </p>
 </body>
 </html>
 